#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QtNetwork/QUdpSocket>
#include <QHostAddress>
#include <QThread>
#include <QLabel>
bool func1(int i);

/*UDP 结构体函数*/
class MyThread : public QThread
{
public:
    void Send();

public:
 void run();

};

/*UDP 结构体函数*/
class alstThread : public QThread
{
      Q_OBJECT
public:
    void alsa();
public slots:
    void processPendingDatagram();

public:
 void run();

};


namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
   void init_statusBar(); //初始化状态栏

public slots:
   void mySlot();
   void cominit(void);
   void cominit_over(void);
   void pushButton_alsa_ok(void);
   void pushButton_alsa_over(void);
private:
    Ui::MainWindow *ui;
    MyThread thread;
    alstThread ALSA;
    QLabel* first_statusLabel; //声明两个标签对象，用于显示状态信息
    QLabel* second_statusLabel;

};
extern int count;
extern int ttime;
extern int  prot;
extern char ip_string[40];


#endif // MAINWINDOW_H
